<script setup>
import { RouterView } from 'vue-router'
import { ref } from 'vue'

import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'

const language = ref('zh-cn')
</script>

<template>
  <el-config-provider :locale="language === 'zh-cn' ? zhCn : en">
    <div class="app-container">
      <main class="main-content">
        <RouterView />
      </main>
    </div>
  </el-config-provider>
</template>

<style lang="scss" scoped>
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
</style>
